package com.hd.service.test;

import java.util.List;

import com.hd.common.DataPage;
import com.hd.persistence.model.ActualizeProject;
import com.hd.utils.HdException;

public class ActualizeProjectManagerTestCase extends BaseTest {
	
	//保存实体
//	public void testSaveActualizeProject() throws HdException {
//		RepairReport repairReport = new RepairReport();
//		repairReport.setRepairReportId(1L);
//		for ( int i = 0; i < 3; i++ ) {
//			ActualizeProject actualizeProject = new ActualizeProject();
//			actualizeProject.setRepairReport(repairReport);
//			actualizeProject.setMachinePart("机器零件" + i);
//			actualizeProject.setOperation1("检查");
//			actualizeProject.setOperation2("更换");
//			repairManager.saveActualizeProject(actualizeProject);
//		}
//	}
	
	//分页查询实施项目
	public void testPageQueryActualizeProjects() throws HdException {
		DataPage<ActualizeProject> dataPage = repairManager.pageQueryActualizeProjects(1, 10);
		System.out.println("查询总数为:" + dataPage.getTotalCount());
		List<ActualizeProject> actualizeProjects = dataPage.getData();
		for ( ActualizeProject actualizeProject : actualizeProjects ) {
			System.out.println(actualizeProject.getActualizeProjectId() + " " + actualizeProject.getMachinePart());
		}
	}

}
